/**
 * 初始化字典详情对话框
 */
var VipTypeInfoDlg = {
    name: $("#add_keyword").val(),
    price: $("#add_po").val(),
    days: $("#add_days").val(),
};

/**
 * 关闭此对话框
 */
VipTypeInfoDlg.close = function () {
    parent.layer.close(window.parent.Type.layerIndex);
};


/**
 * 提交添加字典
 */
VipTypeInfoDlg.addSubmit = function () {
    //提交信息
    var name = $("#add_keyword").val();
    var price = $("#add_po").val();
    var days = $("#add_days").val();
    var ajax = new $ax(Feng.ctxPath + "/vipType/insert", function (data) {
        Feng.success("添加成功!");
        window.parent.Type.table.refresh();
        VipTypeInfoDlg.close();
    }, function (data) {
        Feng.error("添加失败!" + data.responseJSON.message + "!");
    });
    ajax.set('name',name);
    ajax.set('price',price);
    ajax.set('days',days);
    ajax.start();
};
